// element-plus 组件的按需引用
import {
  ElButton,
  ElSelect,
  ElOption,
  ElTable,
  ElTableColumn,
  ElCheckbox,
  ElCheckboxGroup,
  ElCheckboxButton,
  ElPagination,
  ElDatePicker,
  ElIcon,
  ElInput,
  ElSwitch,
  ElRadioGroup,
  ElRadio,
  ElRadioButton,
  ElPopover,
  ElTooltip,
  ElCascader,
  ElDialog,
  ElDropdown,
  ElDropdownItem,
  ElDropdownMenu,
  ElTree,
  ElEmpty,
  ElLoading,
  ElMessageBox,
  ElMessage,
  ElTag,
  ElForm,
  ElFormItem,
  ElInputNumber,
} from 'element-plus';

export default {
  install(app) {
    app.component(ElButton.name, ElButton);
    app.component(ElSelect.name, ElSelect);
    app.component(ElOption.name, ElOption);
    app.component(ElTable.name, ElTable);
    app.component(ElTableColumn.name, ElTableColumn);
    app.component(ElCheckbox.name, ElCheckbox);
    app.component(ElCheckboxGroup.name, ElCheckboxGroup);
    app.component(ElCheckboxButton.name, ElCheckboxButton);
    app.component(ElPagination.name, ElPagination);
    app.component(ElDatePicker.name, ElDatePicker);
    app.component(ElIcon.name, ElIcon);
    app.component(ElInput.name, ElInput);
    app.component(ElSwitch.name, ElSwitch);
    app.component(ElRadioGroup.name, ElRadioGroup);
    app.component(ElRadio.name, ElRadio);
    app.component(ElRadioButton.name, ElRadioButton);
    app.component(ElPopover.name, ElPopover);
    app.component(ElTooltip.name, ElTooltip);
    app.component(ElCascader.name, ElCascader);
    app.component(ElDialog.name, ElDialog);
    app.component(ElDropdown.name, ElDropdown);
    app.component(ElDropdownMenu.name, ElDropdownMenu);
    app.component(ElDropdownItem.name, ElDropdownItem);
    app.component(ElTree.name, ElTree);
    app.component(ElEmpty.name, ElEmpty);
    app.component(ElTag.name, ElTag);
    app.component(ElForm.name, ElForm);
    app.component(ElFormItem.name, ElFormItem);
    app.component(ElInputNumber.name, ElInputNumber);
    app.use(ElLoading);
    app.config.globalProperties.$EleMessageBox = ElMessageBox;
    app.config.globalProperties.$message = ElMessage;
  },
};
